/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 分页查询标准 GET /standard */
export async function standardGetStandardPage({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.StandardGetStandardPageParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelResponseDataListModelStandardModel_>(
    '/standard',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 编辑标准 PUT /standard */
export async function standardEditStandard({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.StandardEditStandardParams;
  body: API.AddOrEditStandardModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/standard', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增标准 POST /standard */
export async function standardAddStandard({
  body,
  options,
}: {
  body: API.AddOrEditStandardModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/standard', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除标准 DELETE /standard */
export async function standardEditStandard2({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.StandardEditStandardParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/standard', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询国民经济行业分类树 GET /standard/category/cn */
export async function standardGetStandardCategoryCnTree({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelListStandardCategoryCNTreeModel_>(
    '/standard/category/cn',
    {
      method: 'GET',
      ...(options || {}),
    }
  );
}

/** 分页查询标准（h5） GET /standard/h5 */
export async function standardGetStandardPageH5({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.StandardGetStandardPageH5Params;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelResponseDataListModelH5StandardModel_>(
    '/standard/h5',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 查询标准详情（h5） GET /standard/h5/detail */
export async function standardGetStandardDetailH5({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.StandardGetStandardDetailH5Params;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelH5StandardModel_>('/standard/h5/detail', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 分级标准统计 GET /standard/statistics */
export async function standardStatistics({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelListStandardStatisticsModel_>(
    '/standard/statistics',
    {
      method: 'GET',
      ...(options || {}),
    }
  );
}
